package com.example.myapplication.lol.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.myapplication.R;
import com.example.myapplication.lol.bean.NewsBean;

import org.jetbrains.annotations.NotNull;

public class NewsAdapter extends BaseQuickAdapter<NewsBean, BaseViewHolder> {
    public NewsAdapter() {
        super(R.layout.item_news_info);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NewsBean newsBean) {
        baseViewHolder.setText(R.id.news_title,newsBean.getTitle());
        baseViewHolder.setText(R.id.news_lol,"LOL");
        baseViewHolder.setText(R.id.news_hero,"英雄联盟赛事官方");
        baseViewHolder.setImageResource(R.id.news_mes,R.drawable.news);
        baseViewHolder.setText(R.id.news_read,"15");
        baseViewHolder.setImageResource(R.id.news_cha,R.drawable.cha);
        baseViewHolder.setImageResource(R.id.news_img,R.drawable.banner1);
    }
}
